home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -websites- / wirenet / files / thor25_arexx.lha / Examples / BBSData.br < prev    next >
Text File  |  1995-09-06  |  8KB  |  155 lines

  1. /*  BBSData.br
  2.  *
  3.  *  Shows all data about a BBS.
  4.  *  
  5.  *  Script by: Eivind Nordseth, Ultima Thule Software.
  6.  */
  7.  
  8. /*    trace results */
  9.  
  10.     parse arg argument
  11.  
  12.     if(argument = '') then
  13.     do
  14.         say '$VER: BBSData.br V4.1 (08.08.95)'
  15.         say 'Template: BBSNAME/A'
  16.         exit
  17.     end
  18.  
  19.     if ~show('p', 'BBSREAD') then do
  20.         address command
  21.             "run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
  22.             "WaitForPort BBSREAD"
  23.     end
  24.  
  25.     address BBSREAD
  26.  
  27.     /* Bit numbers for script flags */
  28.     
  29.     SB_NEWFILES   = 0   /* Do newfiles scan every logon. */
  30.     SB_AUTOPDNL   = 1   /* Automaticaly download private files. */
  31.     SB_AUTOLOGOFF = 2   /* Automaticaly logoff after all is done. */
  32.     SB_USECOLORS  = 3   /* Use colors on BBS. */
  33.     SB_ANSIMENUES = 4   /* Use ANSI menues. */
  34.     SB_BULLETINS  = 5   /* Get new bulletins on every logon. */
  35.  
  36.  
  37.     /* Bit numbers for bbs data flag */
  38.  
  39.     BDB_GLOBAL_KEEPMSG   = 0   /* Use global KeepMsg. */
  40.     BDB_GLOBAL_KEEPTIME  = 1   /* Use global KeepTime. */
  41.     BDB_IGNORE_KEEPMSG   = 2   /* Don't count messages when packing conferences. */
  42.     BDB_IGNORE_KEEPTIME  = 3   /* Don't check time when packing conferences. */
  43.     BDB_NO_XPK_METHOD    = 4   /* Don't use any xpk method. */
  44.     BDB_EVENTS_CHANGED   = 5   /* Events changed after last event package was made. */
  45.     BDB_NO_SIGNATURE     = 6   /* Don't use signatures. */
  46.     BDB_MARK_OWN_MSGS    = 7   /* Also mark messages from user when adding messages. */
  47.     BDB_NO_TAGS          = 8   /* Don't use tags. */
  48.     BDB_ADD_USERS        = 9   /* Parser should add users to database. */
  49.     BDB_FILE_SIGNATURE   = 10  /* The Signature field contains the path and name of a file containing the signature. */
  50.     BDB_AUTO_XPK_PACK    = 11  /* Automatically xpk pack new messages when they are written to this bbs. NB: A xpk method must have been defined. */
  51.     BDB_NO_AUTO_XPK_PACK = 12  /* No automatically xpk packing on this bbs. */
  52.     BDB_COMMAND_SIGNATURE = 13  /* The signature field contains the path and name of a command. When the command is executed should the signature contents be written to stdout. The template for the command is expected to be BBSNAME/K,CONFNAME/K. */
  53.     BDB_REFLOW_QUOTING    = 14  /* Reflow quoting should be on as default when answering messages. This flag should only be considered when bd_QuoteType is != QT_USE_SUPER. */
  54.     BDB_ALWAYS_REPLY_STR  = 15  /* Use reply string on all replies. This flag should only be considered when bd_ReplyString is non NULL. */
  55.     BDB_NO_REPLY_STR      = 16  /* Don't use reply strings on this bbs. Overrides the setting of bd_ReplyString. */
  56.     BDB_GLOBAL_REPLY_STR  = 17  /* Use global reply string settings. Overrides all other bbs reply string settings. */
  57.     BDB_NO_BBS_ENTER_SCR  = 18  /* Don't use a bbs enter script on this bbs. */
  58.     BDB_NO_BBS_LEAVE_SCR  = 19  /* Don't use a bbs ieave script on this bbs. */
  59.     BDB_NO_CONF_ENTER_SCR = 20  /* Don't use a conference enter script on this bbs. */
  60.     BDB_NO_CONF_LEAVE_SCR = 21  /* Don't use a conference leave script on this bbs. */
  61.     BDB_ENCODE_8BIT_MAIL  = 22  /* Encode 8 bits messages in mail conferences. Only appliable when the TDF_SUPPORTS_ENCODE_8BIT_MAIL flag is set for the bbstype. */
  62.     BDB_ENCODE_8BIT_MSGS  = 23  /* Encode 8 bits messages in public conferences. Only appliable when the TDF_SUPPORTS_ENCODE_8BIT_MSGS flag is set for the bbstype. */
  63.  
  64.     GETBBSDATA argument stem BBSDATA
  65.     if(rc ~= 0) then 
  66.     do
  67.         say BBSREAD.LASTERROR
  68.         exit
  69.     end
  70.  
  71.     say 'Name:           ' BBSDATA.NAME
  72.     say 'GrabName:       ' BBSDATA.GRABNAME
  73.     say 'BBSType:        ' BBSDATA.BBSTYPE
  74.     say 'UserName:       ' BBSDATA.USERNAME
  75.     say 'Signature:      ' BBSDATA.SIGNATURE
  76.     say 'LineLength:     ' BBSDATA.LINELENGTH
  77.     say 'CharSet:        ' BBSDATA.CHARSET
  78.  
  79.     bf = ''
  80.     if bittst(BBSDATA.FLAGS,BDB_GLOBAL_KEEPMSG)    then bf = bf || 'GLOBAL_KEEPMSG '
  81.     if bittst(BBSDATA.FLAGS,BDB_GLOBAL_KEEPTIME)   then bf = bf || 'GLOBAL_KEEPTIME '
  82.     if bittst(BBSDATA.FLAGS,BDB_IGNORE_KEEPMSG)    then bf = bf || 'IGNORE_KEEPMSG '
  83.     if bittst(BBSDATA.FLAGS,BDB_IGNORE_KEEPTIME)   then bf = bf || 'IGNORE_KEEPTIME '
  84.     if bittst(BBSDATA.FLAGS,BDB_NO_XPK_METHOD)     then bf = bf || 'NO_XPK_METHOD '
  85.     if bittst(BBSDATA.FLAGS,BDB_EVENTS_CHANGED)    then bf = bf || 'EVENTS_CHANGED '
  86.     if bittst(BBSDATA.FLAGS,BDB_NO_SIGNATURE)      then bf = bf || 'NO_SIGNATURE '
  87.     if bittst(BBSDATA.FLAGS,BDB_MARK_OWN_MSGS)     then bf = bf || 'MARK_OWN_MSGS '
  88.     if bittst(BBSDATA.FLAGS,BDB_NO_TAGS)           then bf = bf || 'NO_TAGS '
  89.     if bittst(BBSDATA.FLAGS,BDB_ADD_USERS)         then bf = bf || 'ADD_USERS '
  90.     if bittst(BBSDATA.FLAGS,BDB_FILE_SIGNATURE)    then bf = bf || 'FILE_SIGNATURE '
  91.     if bittst(BBSDATA.FLAGS,BDB_AUTO_XPK_PACK)     then bf = bf || 'AUTO_XPK_PACK '
  92.     if bittst(BBSDATA.FLAGS,BDB_NO_AUTO_XPK_PACK)  then bf = bf || 'NO_AUTO_XPK_PACK '
  93.     if bittst(BBSDATA.FLAGS,BDB_COMMAND_SIGNATURE) then bf = bf || 'COMMAND_SIGNATURE '
  94.     if bittst(BBSDATA.FLAGS,BDB_REFLOW_QUOTING)    then bf = bf || 'REFLOW_QUOTING '
  95.     if bittst(BBSDATA.FLAGS,BDB_ALWAYS_REPLY_STR)  then bf = bf || 'ALWAYS_REPLY_STR '
  96.     if bittst(BBSDATA.FLAGS,BDB_NO_REPLY_STR)      then bf = bf || 'NO_REPLY_STR '
  97.     if bittst(BBSDATA.FLAGS,BDB_GLOBAL_REPLY_STR)  then bf = bf || 'GLOBAL_REPLY_STR '
  98.     if bittst(BBSDATA.FLAGS,BDB_NO_BBS_ENTER_SCR)  then bf = bf || 'NO_BBS_ENTER_SCR '
  99.     if bittst(BBSDATA.FLAGS,BDB_NO_BBS_LEAVE_SCR)  then bf = bf || 'NO_BBS_LEAVE_SCR '
  100.     if bittst(BBSDATA.FLAGS,BDB_NO_CONF_ENTER_SCR) then bf = bf || 'NO_CONF_ENTER_SCR '
  101.     if bittst(BBSDATA.FLAGS,BDB_NO_CONF_LEAVE_SCR) then bf = bf || 'NO_CONF_LEAVE_SCR '
  102.     if bittst(BBSDATA.FLAGS,BDB_ENCODE_8BIT_MAIL) then bf = bf || 'ENCODE_8BIT_MAIL '
  103.     if bittst(BBSDATA.FLAGS,BDB_ENCODE_8BIT_MSGS) then bf = bf || 'ENCODE_8BIT_MSGS '
  104.  
  105.     do w=4 to words(bf) by 4
  106.         bf    = subword(bf, 1, w) || '0a'x || '                 ' || subword(bf, w + 1)
  107.     end
  108.     say 'Flags:          ' bf
  109.  
  110.     bf = ''
  111.     if bittst(BBSDATA.SCRFLAGS,SB_NEWFILES)   then bf = bf || 'NEWFILES '
  112.     if bittst(BBSDATA.SCRFLAGS,SB_AUTOPDNL)   then bf = bf || 'AUTOPDNL '
  113.     if bittst(BBSDATA.SCRFLAGS,SB_AUTOLOGOFF) then bf = bf || 'AUTOLOGOFF '
  114.     if bittst(BBSDATA.SCRFLAGS,SB_USECOLORS)  then bf = bf || 'USECOLORS '
  115.     if bittst(BBSDATA.SCRFLAGS,SB_ANSIMENUES) then bf = bf || 'ANSIMENUES '
  116.     if bittst(BBSDATA.SCRFLAGS,SB_BULLETINS)  then bf = bf || 'BULLETINS '
  117.     say 'ScriptFlags:    ' bf
  118.  
  119.     say 'KeepMsg:        ' BBSDATA.KEEPMSG
  120.     say 'KeepTime:       ' BBSDATA.KEEPTIME
  121.     say 'EMailAddr:      ' BBSDATA.EMAILADDR
  122.     say 'XpkMethod:      ' BBSDATA.XPKMETHOD
  123.     say 'UserStreet:     ' BBSDATA.USERSTREET
  124.     say 'UserAddress:    ' BBSDATA.USERADDRESS
  125.     say 'UserCountry:    ' BBSDATA.USERCOUNTRY
  126.     say 'UserPhone:      ' BBSDATA.USERPHONE
  127.     say 'Alias:          ' BBSDATA.ALIAS
  128.     say 'DnloadPath:     ' BBSDATA.DNLOADPATH
  129.     say 'TagFile:        ' BBSDATA.TAGFILE
  130.     say 'EventArchiver:  ' BBSDATA.EVENTARCHIVER
  131.     say 'ReplyPacket:    ' BBSDATA.REPLYPACKET
  132.     say 'UploadPath:     ' BBSDATA.UPLOADPATH
  133.     say 'ReplyString:    ' BBSDATA.REPLYSTRING
  134.     say 'QuoteType:      ' BBSDATA.QUOTETYPE
  135.     say 'QuoteChars:     ' BBSDATA.QUOTECHARS
  136.     say 'BBSEnterScript: ' BBSDATA.BBSENTERSCRIPT
  137.     say 'BBSLeaveScript: ' BBSDATA.BBSLEAVESCRIPT
  138.     say 'ConfEnterScript:' BBSDATA.BBSENTERSCRIPT
  139.     say 'ConfLeaveScript:' BBSDATA.BBSLEAVESCRIPT
  140.     say 'BBSPath:        ' BBSDATA.BBSPATH
  141.  
  142.     say 'FirstEvent:   ' BBSDATA.FIRSTEVENT
  143.     say 'LastEvent:    ' BBSDATA.LASTEVENT
  144.     say 'NumEvents:    ' BBSDATA.NUMEVENTS
  145.     say 'FirstUser:    ' BBSDATA.FIRSTUSER
  146.     say 'LastUser:     ' BBSDATA.LASTUSER
  147.     say 'NumUsers:     ' BBSDATA.NUMUSERS
  148.     say 'FirstKill:    ' BBSDATA.FIRSTKILL
  149.     say 'LastKill:     ' BBSDATA.LASTKILL
  150.     say 'NumKills:     ' BBSDATA.NUMKILLS
  151.     say 'SumMarked:    ' BBSDATA.SUMMARKED
  152.     say 'SumM2User:    ' BBSDATA.SUMM2USER
  153.  
  154.     exit
  155.